home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / xprz351s.lha / Zmodem.h < prev   
Text File  |  1994-11-09  |  5KB  |  95 lines

  1. /*
  2.  *   Z M O D E M . H     Manifest constants for ZMODEM
  3.  *    application to application file transfer protocol
  4.  *    01-15-87  Chuck Forsberg Omen Technology Inc
  5.  */
  6.  
  7. #define ZPAD    '*'        /* 052 Padding character begins frames */
  8. #define ZDLE    030        /* Ctrl-X Zmodem escape - `ala BISYNC DLE */
  9. #define ZDLEE   (ZDLE^0100)    /* Escaped ZDLE as transmitted */
  10. #define ZBIN    'A'        /* Binary frame indicator */
  11. #define ZHEX    'B'        /* HEX frame indicator */
  12. #define ZBIN32  'C'        /* Binary frame with 32 bit FCS */
  13.  
  14. /* Frame types (see array "frametypes" in zm.c) */
  15. #define ZRQINIT     0        /* Request receive init */
  16. #define ZRINIT      1        /* Receive init */
  17. #define ZSINIT      2        /* Send init sequence (optional) */
  18. #define ZACK        3        /* ACK to above */
  19. #define ZFILE       4        /* File name from sender */
  20. #define ZSKIP       5        /* To sender: skip this file */
  21. #define ZNAK        6        /* Last packet was garbled */
  22. #define ZABORT      7        /* Abort batch transfers */
  23. #define ZFIN        8        /* Finish session */
  24. #define ZRPOS       9        /* Resume data trans at this position */
  25. #define ZDATA      10        /* Data packet(s) follow */
  26. #define ZEOF       11        /* End of file */
  27. #define ZFERR      12        /* Fatal Read or Write error Detected */
  28. #define ZCRC       13        /* Request for file CRC and response */
  29. #define ZCHALLENGE 14        /* Receiver's Challenge */
  30. #define ZCOMPL     15        /* Request is complete */
  31. #define ZCAN       16        /* Other end canned session with CAN*5 */
  32. #define ZFREECNT   17        /* Request for free bytes on filesystem */
  33. #define ZCOMMAND   18        /* Command from sending program */
  34. #define ZSTDERR    19        /* Output to standard error, data follows */
  35.  
  36. /* ZDLE sequences */
  37. #define ZCRCE    'h'        /* CRC next, frame ends, header packet follows */
  38. #define ZCRCG    'i'        /* CRC next, frame continues nonstop */
  39. #define ZCRCQ    'j'        /* CRC next, frame continues, ZACK expected */
  40. #define ZCRCW    'k'        /* CRC next, ZACK expected, end of frame */
  41. #define ZRUB0    'l'        /* Translate to rubout 0177 */
  42. #define ZRUB1    'm'        /* Translate to rubout 0377 */
  43.  
  44. /* zdlread return values (internal) */
  45. /* -1 is general error, -2 is timeout */
  46. #define GOTOR    0400
  47. #define GOTCRCE (ZCRCE|GOTOR)    /* ZDLE-ZCRCE received */
  48. #define GOTCRCG (ZCRCG|GOTOR)    /* ZDLE-ZCRCG received */
  49. #define GOTCRCQ (ZCRCQ|GOTOR)    /* ZDLE-ZCRCQ received */
  50. #define GOTCRCW (ZCRCW|GOTOR)    /* ZDLE-ZCRCW received */
  51. #define GOTCAN  (GOTOR|030)    /* CAN*5 seen */
  52.  
  53. /* Byte positions within header array */
  54. #define ZF0     3        /* First flags byte */
  55. #define ZF1     2
  56. #define ZF2     1
  57. #define ZF3     0
  58. #define ZP0     0        /* Low order 8 bits of position */
  59. #define ZP1     1
  60. #define ZP2     2
  61. #define ZP3     3        /* High order 8 bits of file position */
  62.  
  63. /* Bit Masks for ZRINIT flags byte ZF0 */
  64. #define CANFDX  01        /* Rx can send and receive true FDX */
  65. #define CANOVIO 02        /* Rx can receive data during disk I/O */
  66. #define CANBRK  04        /* Rx can send a break signal */
  67. #define CANCRY  010        /* Receiver can decrypt */
  68. #define CANLZW  020        /* Receiver can uncompress */
  69. #define CANFC32 040        /* Receiver can use 32 bit Frame Check */
  70.  
  71. /* Parameters for ZSINIT frame */
  72. #define ZATTNLEN 32        /* Max length of attention string */
  73.  
  74. /* Parameters for ZFILE frame */
  75. /* Conversion options one of these in ZF0 */
  76. #define ZCBIN   1        /* Binary transfer - inhibit conversion */
  77. #define ZCNL    2        /* Convert NL to local end of line convention */
  78. #define ZCRESUM 3        /* Resume interrupted file transfer */
  79. /* Management options, one of these in ZF1 */
  80. #define ZMNEW   1        /* Transfer if source newer or longer */
  81. #define ZMCRC   2        /* Transfer if different file CRC or length */
  82. #define ZMAPND  3        /* Append contents to existing file (if any) */
  83. #define ZMCLOB  4        /* Replace existing file */
  84. #define ZMSPARS 5        /* Encoding for sparse file */
  85. #define ZMDIFF  6        /* Transfer if dates or lengths different */
  86. #define ZMPROT  7        /* Protect destination file */
  87. /* Transport options, one of these in ZF2 */
  88. #define ZTLZW   1        /* Lempel-Ziv compression */
  89. #define ZTCRYPT 2        /* Encryption */
  90. #define ZTRLE   3        /* Run Length encoding */
  91.  
  92. /* Parameters for ZCOMMAND frame ZF0 (otherwise 0) */
  93. #define ZCACK1  1        /* Acknowledge, then do command */
  94. /* End of Zmodem.h source */
  95.